// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdColumn
 */
public class AdColumnDaoImpl
    extends org.tinaelle.server.domain.AdColumnDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdColumnDao#toAdColumnDTO(org.tinaelle.server.domain.AdColumn)
     */
    public org.tinaelle.common.dto.AdColumnDTO toAdColumnDTO(final org.tinaelle.server.domain.AdColumn entity)
    {
        return super.toAdColumnDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdColumn loadAdColumnFromAdColumnDTO(org.tinaelle.common.dto.AdColumnDTO adColumnDTO)
    {
        org.tinaelle.server.domain.AdColumn adColumn = this.load(adColumnDTO.getAdColumnId());
        if (adColumn == null)
        {
            adColumn = org.tinaelle.server.domain.AdColumn.Factory.newInstance();
        }
        return adColumn;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdColumnDao#adColumnDTOToEntity(org.tinaelle.common.dto.AdColumnDTO)
     */
    public org.tinaelle.server.domain.AdColumn adColumnDTOToEntity(org.tinaelle.common.dto.AdColumnDTO adColumnDTO)
    {
        org.tinaelle.server.domain.AdColumn entity = this.loadAdColumnFromAdColumnDTO(adColumnDTO);
        this.adColumnDTOToEntity(adColumnDTO, entity, true);
        return entity;
    }
}